<?php

defined("_ARKN_EXEC") or exit("no no, mr. superman no here");
($_SESSION["roleid"] == Roles::Secretary) or exit("you almost got away with it");
$firstname = $_POST["firstname"];
$lastname = $_POST["lastname"];
$username = $_POST["username"];
$address = $_POST["address"];
$email = $_POST["email"];

require_once "Account.php";
if($account->addAccount(Roles::Student, $firstname, $lastname, $username, $address, $email)) {
	$successMessage = "Student has been added successfully.";
	require ROOT_FOLDER . "/php/pages/operation_successful.php";
} else {
	$errorMessage = "Student could not be be added.";
	require ROOT_FOLDER . "/php/pages/operation_unsuccessful.php";
}
?>
